﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Security.Cryptography;
using System.Text;
using LKVMLMADMIN.Models;
using LKVMLMLib;
using System.Configuration;
using System.Net.Http;
using System.Web.Helpers;
using System.Web.Http;
using System.Web.Http.Cors;

namespace LKVMLMADMIN.Controllers.Api
{
    [EnableCors(origins: "http://localhost:1284/", headers: "*", methods: "*")]
    public class JsonAccountController : ApiController
    {
        public LKVService.User userDB = new LKVService.User();
        public string abc()
        {
            var session = HttpContext.Current.Session;
            if (session != null)
            {
                if (session["Time"] == null)
                    session["Time"] = DateTime.Now;
                return "Session Time: " + session["Time"];
            }
            return "Session is not working";
        }
        public string def()
        {
            var session = HttpContext.Current.Session;
            return "Session Time: " + session["Time"];           
        }        
    }
}
